<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form action="/fileUpload" method="post"  enctype="multipart/form-data">
        <label>上传图片</label><br>
        <input type="file" name="file"><br>
        <input type="submit" value="上传"><br>
    </form>
    <p>图片:</p>
    <div th:text="${data}">xxx</div>
    <div>sun</div>
    <img src="${filename}">
</body>
</html>